package com.api.API.UserAuthDataManager;

import com.api.POJO.UserAuthDataManager.AllUserAuthDataReturnMsg;
import com.api.POJO.UserAuthDataManager.UserAuthData;
import com.api.POJO.UserAuthDataManager.UserAuthDataManagerReturnMsg;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Description :用户登录信息管理模块API
 * @Author :崔昌赫
 * @Date : 2021/10/20
 */

@FeignClient("UserAuthDataManager")
public interface UserAuthDataManagerAPI {
    @PostMapping("/users/auth/data/add")
    UserAuthDataManagerReturnMsg addNewUserAuthData(@RequestBody UserAuthData authData);

    @GetMapping("/users/auth/data/get/all")
    AllUserAuthDataReturnMsg getALlUserAuthData();
    @GetMapping("/users/auth/data/get/uid/{uid}")
    UserAuthDataManagerReturnMsg getUserAuthDataByUid(@PathVariable String uid);
    @GetMapping("/users/auth/data/get/token/{token}")
    UserAuthDataManagerReturnMsg getUserAuthDataByToken(@PathVariable String token);
    @Deprecated
    @GetMapping("/users/auth/data/get/date/{date}")
    UserAuthDataManagerReturnMsg getUserAuthDataByDate(@PathVariable String date);
    @Deprecated
    @GetMapping("/users/auth/data/get/expiration/{expiration}")
    UserAuthDataManagerReturnMsg getUserAuthDataByExpiration(@PathVariable String expiration);

    @PutMapping("/users/auth/data/put/uid/{uid}")
    UserAuthDataManagerReturnMsg updateUserAuthDataByUid(@PathVariable String uid,@RequestBody UserAuthData userAuthData);
    @PutMapping("/users/auth/data/put/token/{token}")
    UserAuthDataManagerReturnMsg updateUserAuthDataByToken(@PathVariable String token,@RequestBody UserAuthData userAuthData);
    @Deprecated
    @PutMapping("/users/auth/data/put/date/{date}")
    UserAuthDataManagerReturnMsg updateUserAuthDataByDate(@PathVariable String date,@RequestBody UserAuthData userAuthData);
    @Deprecated
    @PutMapping("/users/auth/data/put/expiration/{expiration}")
    UserAuthDataManagerReturnMsg updateUserAuthDataByExpiration(@PathVariable String expiration,@RequestBody UserAuthData userAuthData);

    @DeleteMapping("/users/auth/data/delete/uid{uid}")
    UserAuthDataManagerReturnMsg deleteUserAuthDataByUid(@PathVariable String uid);
    @DeleteMapping("/users/auth/data/delete/token/{token}")
    UserAuthDataManagerReturnMsg deleteUserAuthDataByToken(@PathVariable String token);
    @Deprecated
    @DeleteMapping("/users/auth/data/delete/date/{date}")
    UserAuthDataManagerReturnMsg deleteUserAuthDataByDate(@PathVariable String date);
    @Deprecated
    @DeleteMapping("/users/auth/data/delete/expiration/{expiration}")
    UserAuthDataManagerReturnMsg deleteUserAuthDataByExpiration(@PathVariable String expiration);


}
